package com.sky.service.user;

import com.sky.dto.*;
import com.sky.pojo.Courier;
import com.sky.result.PageResult;
import com.sky.vo.OrderPaymentVO;
import com.sky.vo.OrderStatisticsVO;
import com.sky.vo.OrderSubmitVO;
import com.sky.vo.OrderVO;

/**
 * @Description OrderService
 * @Author lyh
 * @Date 2024-10-09
 */
public interface OrderService {
    /**
     * 预计到达时间
     * @param shopId
     * @param customerAddress
     * @return
     */
    String getEstimatedDeliveryTime(Long shopId, String customerAddress);

    /**
     * 用户下单
     * @param dto
     * @return
     */
    OrderSubmitVO sumbit(OrdersSubmitDTO dto);

    OrderPaymentVO payment(OrdersPaymentDTO dto);

    void remainder(Long orderId);

    PageResult page(int page, int pageSize, Integer status);

    OrderVO getOrderDetatl(Long orderId);

    void cancel(Long id);

    void repetition(Long id);

    /**
     * 商家端分页查询
     * @param dto
     * @return
     */
    PageResult conditionSearch(OrdersPageQueryDTO dto);

    /**
     * 各个状态的订单数量统计
     * @return
     */
    OrderStatisticsVO countStatus();

    OrderVO adminOrderDetail(Long orderId);

    void cancelingOrders(OrdersCancelDTO dto);

    void rejectionOrder(OrdersRejectionDTO dto);

    /**
     * 商家接单
     * @param dto
     * @return
     */
    Courier confirm(OrdersConfirmDTO dto);


}
